"""
    查询字符串
"""
import requests

# 设置请求头参数
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36',
    'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
    'Cookie': 'BIDUPSID=F300E4975573FEB7DE86101915400F57; PSTM=1729419595; BAIDUID=F300E4975573FEB7D4C4CA9BC3485022:FG=1; BAIDUID_BFESS=F300E4975573FEB7D4C4CA9BC3485022:FG=1; ZFY=gQpZY9KhzDLlWiELPffgHOQ6l1UxonO47NgeH8ImS0I:C; __bid_n=192d7ada2bc87368678176; BDUSS=mpjNGZLcDkyUDRXSEFySUVtSzIwUFB5bXp3NENVTHNLbHVVZ1lQN2o5bG5wVTVuSUFBQUFBJCQAAAAAAAAAAAEAAAAgWWU10tHKxbXEx-C0ujIwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGcYJ2dnGCdnV; BDUSS_BFESS=mpjNGZLcDkyUDRXSEFySUVtSzIwUFB5bXp3NENVTHNLbHVVZ1lQN2o5bG5wVTVuSUFBQUFBJCQAAAAAAAAAAAEAAAAgWWU10tHKxbXEx-C0ujIwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGcYJ2dnGCdnV; H_PS_PSSID=61027_61097_61177_61207_61212_61209_61215_61244_61280; BA_HECTOR=852h0g240k0k2g84a4052001b6nhjb1jkr8uk1v; delPer=0; PSINO=1; BDORZ=B490B5EBF6F3CD402E515D22BCDA1598',
   }


# url = 'https://www.baidu.com/s?wd=python'
# # 发起模拟请求，并设置请求头参数
# response = requests.get(url, headers=headers)
#
# print(response.content.decode())


# 使用parm参数
url = 'https://www.baidu.com/s'
params = {
    'wd': 'python'
}
response = requests.get(url, params=params, headers=headers)
print(response.content.decode())
print(response.url)
